package com.peak.distribution.exception;

import com.peak.distribution.enums.Constants;
import com.peak.spring.boot.core.exception.ProjectException;

public class DistributionException extends ProjectException {

	private static final long serialVersionUID = Constants.DISTRIBUTION_VERSION;

	private DistributionError errorMessage;

	public DistributionException() {
		super();
	}

	public DistributionException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
		super(message, cause, enableSuppression, writableStackTrace);
	}

	public DistributionException(String message, Throwable cause) {
		super(message, cause);
	}

	public DistributionException(String message) {
		super(message);
	}

	public DistributionException(Throwable cause) {
		super(cause);
	}

	public DistributionException(DistributionError message, Throwable cause) {
		super(message.getMessage(), cause);
		this.errorMessage = message;
	}

	public DistributionException(DistributionError message) {
		super(message.getMessage());
		this.errorMessage = message;
	}

	public DistributionError getError() {
		return this.errorMessage;
	}

}
